import 'package:flutter/services.dart';

class TestNative{
  var _eventPlugin = const EventChannel("test2flutter");
  var _methodChannel = const MethodChannel("test2");


  init(){
    _eventPlugin.receiveBroadcastStream().listen(_onEvent, onError: _onError);
  }

  void _onEvent(Object event) {
    print("event == $event");
  }

  void _onError(Object error) {

  }

  void nativeToast(){
    _methodChannel.invokeMethod("getPlatformVersion");
  }

}